-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add turret event #1237
Add turret event #1237
Conversation
Co-Authored-By: commy2 <commy-2@gmx.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works in local hosted MP.
When does |
It only happens in SP, MP never returns 0 I believe. Addendum: Driver and non-existent turrets also return 0. And since the driver is the vehicle owner, |
In my testing it worked as expected, running on the owner of the vehicle when the turret was not crewed, despite this code block being bugged. I didn't test much with the driver turret [-1] though. I suppose this would benefit from a MP unit test script. |
Got to test this with one other player in local hosted MP, results were as expected. Tested it with a modified version of ZEN that uses the turret event to set the ammo on a vehicle. He placed a vehicle in Zeus, and I adjusted the ammo slider. These are the results I got:
These are the results that I expected. |
A change after I approved lies in how it handles non existing turrets I believe. What would the expected behavior be for non existing turrets? Before I approved the event would trigger nowhere. Now I think it falls back to vehicle locality, but I haven't tested. |
I think a silent fail would be a good solution, I'll work on implementing it. |
Co-Authored-By: jonpas <jonpas33@gmail.com>
When merged this pull request will:
Still a bit unsure whether TUEVENT is a good choice, but I couldn't think of something else.